package com.myhouse.biz.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.myhouse.biz.UserService;
import com.myhouse.dao.UserDao;
import com.myhouse.entity.User;
@Service
public class UserServiceImpl implements UserService{
	@Resource
	private UserDao userDao;

	@Override
	public User checkLogin(String username, String password) {
		return userDao.checkLogin(username, password);
	}

	@Override
	public User checkUsername(String username) {
		return userDao.checkUsername(username);
	}

	@Override
	public void addUser(User user) {
		userDao.addUser(user);
	}

	@Override
	public List<User> getAllOrByTitle(String title) {
		
		return userDao.getAllOrByTitle(title);
	}

	@Override
	public void updateUser(User user) {
		userDao.updateUser(user);
	}

	@Override
	public User getUserById(int id) {	
		return userDao.getUserById(id);
	}

}
